<?php
//api/?c=do-cache
exit;
/**
 ALTER TABLE `uinfo` ADD INDEX (`name`,`idcard`);
 */
set_time_limit(0);
include '../c/config.php';
$mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);
if (!$mysqli->set_charset("utf8")) {printf("Error loading character set utf8: %s\n", $mysqliTwo->error);}

$query=$mysqli->query("SELECT id,name,idcard,qu,school,nianji,phone FROM `uinfo` ");
$data=array();
while ($list=$query->fetch_assoc()){
    $path='../data/user/'.$list['id'].'.txt';
    unlink($path);
    file_put_contents($path, json_encode($list)); 
}
echo 1;
